<?php
# MantisBT - a php based bugtracking system
# Copyright (C) 2002 - 2013  MantisBT Team - mantisbt-dev@lists.sourceforge.net
# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.

auth_reauthenticate( );
access_ensure_global_level( config_get( 'manage_plugin_threshold' ) );

html_page_top( lang_get( 'plugin_format_title' ) );

print_manage_menu( );

?>

<br />
<form action="<?php echo plugin_page( 'notifications/notifications_update' )?>" method="post">
	<?php echo form_security_field( 'plugin_MRMailNotificationManager_notifications_update' ) ?>
	<table align="center" style="border: solid 1px #000000;" cellspacing="1">

		<tr>
			<td class="form-title" colspan="7"><?php echo lang_get( 'plugin_MRMailNotificationManager_title' ) . ": " . lang_get( 'plugin_MRMailNotificationManager_page_notifications' )?>
			</td>
		</tr>
		
		<div align="center"><p>
		<span class="bracket-link">[&nbsp;<?php echo lang_get( 'plugin_MRMailNotificationManager_page_notifications' ) ?>&nbsp;]</span>
		<span class="bracket-link">[&nbsp;<a href="plugin.php?page=MRMailNotificationManager/email/email"><?php echo lang_get( 'plugin_MRMailNotificationManager_page_email' ) ?></a>&nbsp;]</span>
		<span class="bracket-link">[&nbsp;<a href="plugin.php?page=MRMailNotificationManager/templates/templates"><?php echo lang_get( 'plugin_MRMailNotificationManager_page_templates' ) ?></a>&nbsp;]</span>
		</p></div>

		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%"><?php echo lang_get( 'plugin_MRMailNotificationManager_enable_notifications' )?>
			</td>
			<td class="center" colspan="6"><input type="checkbox"
				name="enable_notifications"
				<?php echo( plugin_config_get('enable_notifications') == ON ) ? 'checked' : ''?>/>
			</td>
		</tr>
		
		
		
		<tr>
			<td></td>
		</tr>
		
		
		
		<!-- NOTIFICATIONS TABLE HEADER -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
			</td>
			<td class="center">
				<?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_reg_new' )?><br/>
			</td>
			<td class="center">
				<?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_reg_update' )?><br/>
			</td>
			<td class="center">
				<?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_reg_delete' )?><br/>
			</td>
			<td class="center">
				<?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_note_new' )?><br/>
			</td>
			<td class="center">
				<?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_note_update' )?><br/>
			</td>
			<td class="center">
				<?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_note_delete' )?><br/>
			</td>
		</tr>
		
		
		
		<!-- OWNER -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_user_owner' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="owner_new" <?php echo( plugin_config_get('owner_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="owner_update" <?php echo( plugin_config_get('owner_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="owner_delete" <?php echo( plugin_config_get('owner_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="owner_note_new" <?php echo( plugin_config_get('owner_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="owner_note_update" <?php echo( plugin_config_get('owner_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="owner_note_delete" <?php echo( plugin_config_get('owner_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<!-- HANDLER -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_user_handler' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="handler_new" <?php echo( plugin_config_get('handler_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="handler_update" <?php echo( plugin_config_get('handler_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="handler_delete" <?php echo( plugin_config_get('handler_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="handler_note_new" <?php echo( plugin_config_get('handler_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="handler_note_update" <?php echo( plugin_config_get('handler_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="handler_note_delete" <?php echo( plugin_config_get('handler_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<!-- MONITOR -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_user_monitor' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="monitor_new" disabled <?php echo( plugin_config_get('monitor_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="monitor_update" <?php echo( plugin_config_get('monitor_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="monitor_delete" <?php echo( plugin_config_get('monitor_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="monitor_note_new" <?php echo( plugin_config_get('monitor_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="monitor_note_update" <?php echo( plugin_config_get('monitor_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="monitor_note_delete" <?php echo( plugin_config_get('monitor_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<!-- NOTES -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_user_addnote' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="notes_new" disabled <?php echo( plugin_config_get('notes_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="notes_update" <?php echo( plugin_config_get('notes_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="notes_delete" <?php echo( plugin_config_get('notes_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="notes_note_new" <?php echo( plugin_config_get('notes_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="notes_note_update" <?php echo( plugin_config_get('notes_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="notes_note_delete" <?php echo( plugin_config_get('notes_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<tr>
			<td></td>
		</tr>
		
		
		
		<!-- VIEWER -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_profile_viewer' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="viewer_new" <?php echo( plugin_config_get('viewer_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="viewer_update" <?php echo( plugin_config_get('viewer_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="viewer_delete" <?php echo( plugin_config_get('viewer_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="viewer_note_new" <?php echo( plugin_config_get('viewer_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="viewer_note_update" <?php echo( plugin_config_get('viewer_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="viewer_note_delete" <?php echo( plugin_config_get('viewer_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<!-- REPORTER -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_profile_reporter' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="reporter_new" <?php echo( plugin_config_get('reporter_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="reporter_update" <?php echo( plugin_config_get('reporter_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="reporter_delete" <?php echo( plugin_config_get('reporter_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="reporter_note_new" <?php echo( plugin_config_get('reporter_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="reporter_note_update" <?php echo( plugin_config_get('reporter_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="reporter_note_delete" <?php echo( plugin_config_get('reporter_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<!-- UPDATER -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_profile_updater' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="updater_new" <?php echo( plugin_config_get('updater_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="updater_update" <?php echo( plugin_config_get('updater_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="updater_delete" <?php echo( plugin_config_get('updater_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="updater_note_new" <?php echo( plugin_config_get('updater_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="updater_note_update" <?php echo( plugin_config_get('updater_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="updater_note_delete" <?php echo( plugin_config_get('updater_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<!-- DEVELOPER -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_profile_developer' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="developer_new" <?php echo( plugin_config_get('developer_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="developer_update" <?php echo( plugin_config_get('developer_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="developer_delete" <?php echo( plugin_config_get('developer_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="developer_note_new" <?php echo( plugin_config_get('developer_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="developer_note_update" <?php echo( plugin_config_get('developer_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="developer_note_delete" <?php echo( plugin_config_get('developer_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<!-- MANAGER -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_profile_manager' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="manager_new" <?php echo( plugin_config_get('manager_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="manager_update" <?php echo( plugin_config_get('manager_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="manager_delete" <?php echo( plugin_config_get('manager_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="manager_note_new" <?php echo( plugin_config_get('manager_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="manager_note_update" <?php echo( plugin_config_get('manager_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="manager_note_delete" <?php echo( plugin_config_get('manager_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<!-- ADMINISTRATOR -->
		<tr <?php echo helper_alternate_class( )?>>
			<td class="category" width="30%">
				<div align="left"><?php echo lang_get( 'plugin_MRMailNotificationManager_notifications_profile_administrator' )?></div>
			</td>
			
			<td class="center">
				<input type="checkbox" name="admin_new" <?php echo( plugin_config_get('admin_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="admin_update" <?php echo( plugin_config_get('admin_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="admin_delete" <?php echo( plugin_config_get('admin_delete') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="admin_note_new" <?php echo( plugin_config_get('admin_note_new') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="admin_note_update" <?php echo( plugin_config_get('admin_note_update') == ON ) ? 'checked' : ''?> />
			</td>
			<td class="center">
				<input type="checkbox" name="admin_note_delete" <?php echo( plugin_config_get('admin_note_delete') == ON ) ? 'checked' : ''?> />
			</td>
		</tr>
		
		
		
		<tr>
			<td class="center" colspan="7"><input type="submit" class="button"
				value="<?php echo lang_get( 'plugin_MRMailNotificationManager_update_configurations' )?>" />
			</td>
		</tr>

	</table>
</form>

<?php
html_page_bottom();
